class CreateDictionaries < ActiveRecord::Migration
  def self.up
    create_table (:dictionaries,:options=>'ENGINE=InnoDB DEFAULT CHARSET=utf8',:force => true) do |t|
			t.string :word, :null => false
			t.integer :rank, :default => 0
			t.integer :status, :default => 0
			t.integer :flag, :limit => 4, :default => 0
			t.text :remarks
      t.timestamps
    end
    add_index :dictionaries, :word
  end

  def self.down
    drop_table :dictionaries
    remove_index :dictionaries, :word
  end
end
